<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<link href="../style/plgl.css" rel="stylesheet" type="text/css">
</head>
<body background="../images/未标题-1.png">
<div id="z" align="center" style="margin:0 auto;">
        <div id="logo"><table width="1200" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="250" height="250" style="font-size: 24px; color: #FC0;"><img src="../images/logo.png" width="250" height="250"  alt=""/></td>
    <td width="362" style="font-size: 18mm; color: #FC0; text-align: center;"><p>广州W酒店</p></td>
    <td width="363" style="font-size: 24px; color: #FC0; text-align: center;"><p>Hotels W GuangZhou</p>
      <p>联系电话：400-699-8818<br>
        地址：广州天河区珠江新城冼村路26号（与金穗路交汇处）      
      <table width="363" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
          </tr>
</table>
</div>
<div id="dlzcsc">
<table width="1200" height="400" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="200" valign="top">&nbsp;</td>
    <td width="800" valign="top">
    	<table width="800" height="80" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="center" valign="top" style="font-size: 24px">留言人</td>
    <td align="center" valign="top" style="font-size: 24px">留言时间</td>
    <td align="center" valign="top" style="font-size: 24px">房间名</td>
    <td align="center" valign="top" style="font-size: 24px">留言内容</td>
    <td align="center" valign="top" style="font-size: 24px">审核</td>
    <td align="center" valign="top" style="font-size: 24px">删除</td>
  </tr>
<?php
header("content-type:text/html;charset=utf-8");
include("../conn/conn.php");
session_start();
$sql="select * from tb_lyxt";
$result=mysqli_query($link,$sql);
$rows=mysqli_fetch_assoc($result);
if(mysqli_num_rows($result)>0){
		while($rows=mysqli_fetch_assoc($result)){
		?>
  <tr>
    <td align="center" style="font-size: 24px"><?=$rows['people']?></td>
    <td align="center" style="font-size: 24px"><?=$rows['time']?></td>
    <td align="center" style="font-size: 24px">
	<?php
    $id=$rows['id_room'];
	$sql_f="select * from tb_room where id=".$id;
	$result_f=mysqli_query($link,$sql_f);
if(mysqli_num_rows($result_f)>0){
	$rows_f=mysqli_fetch_assoc($result_f);
	echo $rows_f['name'];
	}else{
		echo "房间不对";
		}
	 ?>
     </td>
    <td align="center" style="font-size: 24px"><?=substr($rows['content'],0,9)."..."?></td>
    <td align="center" style="font-size: 24px"><a href="lysh.php?id=<?=$rows[id]?>">
    <?php
    if($rows['state']=="2"){
		echo "审核";
		}
		else{
			echo"冻结";
			}
	?>
    </a></td>
    <td align="center" style="font-size: 24px"><a href="scly.php?id=<?=$rows[id]?>">删除</a></td>
  </tr>
  <?php
		}
	}else{
		echo "没有任何评论！";
		}
?>
	</table> 
    	<td width="200">&nbsp;</td>
  	</tr>
</table>   

</div>
<div id="b">
          <p style="font-size: 24px; color: #FC0; text-align: center;">Copyright @ hotel-w.cn All rights reserved<br>
  中国•广州市　广州W酒店　Hotels W GuangZhou ICP备11101838号</p>
</div>
</div>
</body>
</html>
